added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / VBASPNETFormViewUpload / Default.aspx
blob00395af83b24e75133dccf293a06ef420ad20a51
1 <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="VBASPNETFormViewUpload._Default" %>
3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5 <html xmlns="http://www.w3.org/1999/xhtml" >
6 <head runat="server">
7     <title></title>
8 </head>
9 <body>
10     <form id="form1" runat="server">
11     <div>    
12         <asp:FormView ID="fvPerson" runat="server">
13         <EditItemTemplate>
14                 <table style="width: 400px;" >
15                     <tr>
16                         <td style="width: 128px; height: 128px;" rowspan="2">
17                             <asp:Image ID="imgPicture" runat="server" 
18                             ImageUrl ='<%# Eval("PersonID","Image.aspx?PersonID={0}") %>' Width="128px" 
19                             Height="128px" /> 
20                         </td>
21                         <td valign="top">
22                             Person ID:
23                             <asp:Label ID="lblPersonID" runat="server" Text='<%# Eval("PersonID") %>' />
24                             <br />
25                             First name:
26                             <asp:TextBox ID="tbFirstName" runat="server" 
27                             Text='<%# Bind("FirstName") %>' />
28                             <br />
29                             Last name:
30                             <asp:TextBox ID="tbLastName" runat="server" 
31                             Text='<%# Bind("LastName") %>' />
32                             <br />                     
33                             Picture path:
34                             <asp:FileUpload ID="uploadPicture" runat="server" />
35                         </td>
36                     </tr>
37                     <tr>
38                         <td valign="bottom">
39                             <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
40                             CommandName="Update" Text="Update" />
41                             &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
42                         CausesValidation="False" CommandName="Cancel" Text="Cancel" />
43                         </td>
44                     </tr>
45                 </table>
46             </EditItemTemplate>
47             <InsertItemTemplate>
48                 <table style="width: 400px;" >
49                     <tr>
50                         <td height="100px" valign="top">
51                             First name:
52                             <asp:TextBox ID="tbFirstName" runat="server" 
53                             Text='<%# Bind("FirstName") %>' />
54                             <br />
55                             Last name:
56                             <asp:TextBox ID="tbLastName" runat="server" 
57                             Text='<%# Bind("LastName") %>' />
58                             <br />                     
59                             Picture path:
60                             <asp:FileUpload ID="uploadPicture" runat="server" />
61                         </td>
62                     </tr>
63                     <tr>
64                         <td height="28px" valign="bottom">
65                              <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
66                             CommandName="Insert" Text="Insert" />
67                             &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
68                             CausesValidation="False" CommandName="Cancel" Text="Cancel" />
69                         </td>
70                     </tr>
71                 </table>              
72             </InsertItemTemplate>
73             <ItemTemplate>
74                 <table style="width: 400px;">                
75                     <tr>
76                         <td style="width: 128px; height: 128px;" rowspan="2">
77                             <asp:Image ID="imgPicture" runat="server" 
78                             ImageUrl ='<%# Eval("PersonID","Image.aspx?PersonID={0}") %>' Width="128px" 
79                             Height="128px" /> 
80                         </td>
81                         <td valign="top">
82                             Person ID:
83                             <asp:Label ID="lblPersonID" runat="server" Text='<%# Eval("PersonID") %>' />
84                             <br />
85                             First name:
86                             <asp:Label ID="lblFirstName" runat="server" Text='<%# Eval("FirstName") %>' />
87                             <br />
88                             Last name:
89                             <asp:Label ID="lblLastName" runat="server" Text='<%# Eval("LastName") %>' />                            
90                         </td>
91                     </tr>
92                     <tr>
93                         <td valign="bottom">
94                             <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" 
95                             CommandName="Edit" Text="Edit" />
96                             &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" 
97                             CommandName="Delete" Text="Delete" />
98                             &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" 
99                             CommandName="New" Text="New" />
100                         </td>
101                     </tr>                     
102                 </table>             
103             </ItemTemplate>            
104         </asp:FormView>    
105     </div>
106     </form>
107 </body>
108 </html>